package com.huang.springbootthymeleafshiro.utils;

import java.util.Random;

public class SaltUtils  {
    public static String getSalt(int n){
        char[] chars = "ABCDEFGabcdefg123456".toCharArray();
        StringBuilder stringBuilder=new StringBuilder();
        for(int i=0;i<n;i++){
            char c = chars[new Random().nextInt(chars.length)];
            stringBuilder.append(c);
        }
        return stringBuilder.toString();
    }

    public static void main(String[] args) {
        System.out.println(getSalt(8));
    }
}
